export default {
    namespaced: true,
    state: {
        "$row": null,
        respondData: null,
    },
    getters: {
        getData: state => key => {
            return state[key]
        }
    },
    mutations: {
        setData(state, data) {
            for (let i = 0; i < data.length; i++) {
                const element = data[i];
                state[element.key] = element.value
            }
        }
    },
    actions: {
        setData(context, data) {
            context.commit('setData', data)
        }
    }
}